﻿<!DOCTYPE html>
<!--风险类别管理列表-->
<html>

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
        <script src="/static/js/common.js"></script>

</head>

<body>
    
<div id="app" v-cloak>   
        <el-form ref="form" :inline="true" label-position="right" label-width="100px" :model="formInline"
            class="demo-form-inline" style="margin-bottom: 15px;">
            <el-row>
                <el-col class="head-tool">
                    
<div class="new_title fl"><strong><img src="/static/images/icon1.png" />风险类别管理列表</strong></div>
                    <span>
                        <btn :text="col.btnAdd" linetype="3" @click="UserInput('tj')"></btn>
                        <btn :text="col.btnDelete" linetype="4" @click="onDelete"></btn>
                    </span>
                </el-col>
            </el-row>
        </el-form>
        <el-table stripe :data="TreeTable" style="width: 100%;margin-bottom: 20px;" border
            @selection-change="handleSelectionChange" row-style="height:10px" row-key="id">
            <el-table-column type="selection" align="center" width="55">
            </el-table-column>
            <!--<el-table-column type="index" :label="OperatingProcedures.SerialNumber"
                             :index="indexMethod" width="50" show-overflow-tooltip="true"></el-table-column>-->

            <el-table-column prop="ProductionActivityName" label="名称" width="240">

            </el-table-column>
            <el-table-column prop="Code" label="编号" width="180">
            </el-table-column>
            <el-table-column prop="remarks" label="备注" show-overflow-tooltip="true">
            </el-table-column>
            <el-table-column width="53" prop="update" :label="col.btnUpdate" fixed="right">
                <template slot-scope="scope">
                    <button type="button" class="elst-bt-xg" @click=UserInput('xg',scope.row.id)>
                        <i class="el-icon-edit"></i>
                    </button>
                </template>
            </el-table-column>
        </el-table>
        <el-dialog title="风险类别管理" fullscreen="true" :visible.sync="ListItem.dialogVisible" @close='closeDialog' width="80%" height="80%"
            top="10vh">
            <iframe ref="iframe" :src="ListItem.InputUrl" style="height:95%;width:100%" frameborder="0"></iframe>
        </el-dialog>
    </div>
    <script type="text/javascript">

        app = new Vue({
            el: '#app',
            data: function () {
                return {
                    TreeTable: [],
                    mydata: RiskCategoryaaa,
                    ListItem: ListItem,
                    formInline: {
                        model: { id: '', ProductionActivityName: '', Code: '', remarks: '', pid: '' },
                        offset: 0,
                        limit: 10
                    },
                    childrenAdd: {},
                }
            },
            created: function () {
            },
            mounted: function () {
                this.TreeTable = fn1(this.mydata, "0");
                tablehigh(this);//计算table高度以及el-tab-pane高度
            },
            methods: {
                //解決edge下select bug
                visibleChange: function (isVisible) {
                    visibleChange(isVisible)
                },
                indexMethod: function (index) {
                    return (this.ListItem.currentPage - 1) * this.ListItem.pagesize + index + 1;
                },
                //closeDialog: function () {
                //    this.TreeTable = fn1(RiskCategoryaaa, "0");
                //},
                closeDialog: function () {
                    var c = this.childrenAdd;
                    var m = this.mydata;
                    if (c) {
                        m.forEach(function (v) {
                            if (v.id == c.id) {
                                for (var key in c) {
                                    v[key] = c[key];
                                }
                            }
                        })
                    }
                    this.TreeTable = fnCommon(m, "0");
                },
                handleNodeClick: function (data) {
                    console.log(data);
                },
                UserInput: function (val, id) { DialogShow(this, val, "RiskCategoryManagementInput.html", id); },
                onDelete: function () { onDeleteA(this, '/api/RiskCategoryManagement/DeleteMuti'); },
                handleSelectionChange: function (val) { handleSelectionChange(this, val); },
            }
        });
    </script>

</body>

</html>